<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>2D转换</title>

    <style>
        div {
            width: 100px;
            height: 100px;
        }

        /* 为每个div设置颜色 */
        .box1 {
            background-color: red;
        }
        .box2 {
            background-color: aqua;
        }
        .box3 {
            background-color: chocolate;
        }
        .box4 {
            background-color: darkcyan;
        }

        /* 为每个盒子设置不同的2D变换效果 */
        .box1:hover {
            transform: translateX(100px);
        }
        .box2:hover {
            transform: scale(0.5);
        }
        .box3:hover {
            transform: rotate(-30deg);
        }
        .box4:hover {
            transform: skew(30deg);
        }
    </style>

</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
    <div class="box4"></div>
</body>
</html>

